﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace OODCRM.Dialogs
{
    /// <summary>
    /// Interaction logic for SanPham.xaml
    /// </summary>
    public partial class SanPhamDialog : Window
    {

        private SANPHAM mySanPham = new SANPHAM();
        public SANPHAM MySanPham
        {
            get { return mySanPham; }
            set { mySanPham = value; }
        }

        private List<PHANLOAISANPHAM> myPhanLoais = new List<PHANLOAISANPHAM>();
        public List<PHANLOAISANPHAM> MyPhanLoais
        {
            get { return myPhanLoais; }
            set { myPhanLoais = value; }
        }

        public SanPhamDialog()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(SanPhamDialog_Loaded);
        }

        void SanPhamDialog_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataContext = MySanPham;
            this.cbxPhanLoai.ItemsSource = MyPhanLoais;
        }
    }
}
